package Tools.Lighting;

import GameMath.GSize;

/** Light map class
 * @author Aikidos
 */
public class LightMap {
	/** Map */
	private LightMapCell[][] _map;
	
	/** Size of map */
	private GSize _mapSize;
	
	public LightMap(GSize size) {
		_mapSize = new GSize(size);
		
		// Create light map
		_map = new LightMapCell[_mapSize.width][_mapSize.height];
		for (int i = 0; i < _mapSize.width; i++)
			for (int j = 0; j < _mapSize.height; j++)
				_map[i][j] = new LightMapCell();
	}
	
	/** Returns map
	 * @return Map
	 */
	public LightMapCell[][] getMap() {
		return _map;
	}
	
	/** Returns map size
	 * @return Size of map
	 */
	public GSize getSize() {
		return _mapSize;
	}
	
	/** Clear light map */
	public void clear() {
		for (int i = 0; i < _mapSize.width; i++)
			for (int j = 0; j < _mapSize.height; j++)
				_map[i][j] = new LightMapCell();
	}
	
}
